﻿using HandyControl.Controls;

namespace SlamDunk.MES.DataDrive.Client.Views
{
    /// <summary>
    /// ShellView.xaml 的交互逻辑
    /// </summary>
    public partial class ShellView : Window
    {
        public ShellView()
        {
            this.InitializeComponent();
        }

        private void Selector_OnSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            var dataGrid = sender as System.Windows.Controls.DataGrid;
            if (dataGrid?.SelectedItem == null) return;
            dataGrid.ScrollIntoView(dataGrid.SelectedItem);
        }
    }
}